﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Models;
using BLL;

namespace PCCS.Management
{
    public partial class left : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int id = int.Parse(Session["admin"].ToString());

                IList<LeftLink> left = LeftLinkManager.GetLeftLinksByUserID3(id);
                Repeater1.DataSource = left;
                Repeater1.DataBind();
            }
        }

        protected string GetLinkTitle(int leftId)
        {
            string typeTitle = "";
            LeftType type = LeftTypeManager.GetLeftTypeByLeftTypeID(leftId);
            typeTitle = type.TypeTitle;
            return typeTitle;
        }

        protected string GetLink(int leftId)
        {
            string typelink = "";
            LeftType type = LeftTypeManager.GetLeftTypeByLeftTypeID(leftId);
            typelink = type.TypeLink;
            return typelink;
        }

        protected IList<LeftLink> GetData(int leftId)
        {
            int id = int.Parse(Session["admin"].ToString());
            IList<LeftLink> Learing = LeftLinkManager.GetLeftLinksByUserID6(id, leftId);
            return Learing;
        }
    }
}
